* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #2c3e50;
    color: white;
}

.hidden {
    display: none;
}

#game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-menu {
    text-align: center;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.chapter-button {
    display: block;
    width: 300px;
    margin: 1rem auto;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.chapter-button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

#faction-select {
    text-align: center;
    width: 80%;
    max-width: 1000px;
}

#faction-title {
    margin-bottom: 2rem;
    font-size: 2rem;
}

#faction-buttons {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.faction {
    width: 45%;
    padding: 1rem;
    border-radius: 10px;
}

#red-faction {
    background-color: rgba(231, 76, 60, 0.7);
}

#blue-faction {
    background-color: rgba(52, 152, 219, 0.7);
}

.countries-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.country-button {
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.country-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.nav-button {
    padding: 0.5rem 1rem;
    background-color: #2c3e50;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
}

#game-screen {
    width: 100%;
    height: 100%;
    position: relative;
}

#hud {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#player-info {
    display: flex;
    gap: 20px;
}

#score-display {
    display: flex;
    gap: 20px;
}

#blue-score {
    color: #3498db;
}

#red-score {
    color: #e74c3c;
}

#battlefield {
    width: 100%;
    height: 100%;
    background-color: #8e8e8e;
    position: relative;
    overflow: hidden;
}

.player, .enemy {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: transform 0.1s;
}

.player {
    z-index: 5;
    border: 2px solid white;
}

.player-name {
    position: absolute;
    top: -20px;
    width: 100px;
    text-align: center;
    font-size: 12px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-flag {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.red-team {
    background-color: rgba(231, 76, 60, 0.7);
}

.blue-team {
    background-color: rgba(52, 152, 219, 0.7);
}

.bullet {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: yellow;
    border-radius: 50%;
    z-index: 4;
}

#back-to-faction {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

#player-name-input {
    margin-bottom: 20px;
}

#username-input {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #3498db;
    width: 300px;
    text-align: center;
}

.mode-button {
    display: inline-block;
    width: 150px;
    margin: 1rem 10px;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-button:hover {
    background-color: #27ae60;
    transform: scale(1.05);
}

#npc-settings {
    margin: 1rem auto;
    padding: 1rem;
    background-color: rgba(52, 73, 94, 0.7);
    border-radius: 10px;
    width: 300px;
}

#npc-count {
    width: 200px;
    margin: 0 10px;
}

#chat-container {
    position: absolute;
    bottom: 50px;
    right: 20px;
    width: 300px;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    color: white;
    font-size: 14px;
}

#chat-input-container {
    display: flex;
    padding: 5px;
}

#chat-input {
    flex-grow: 1;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #3498db;
}

#send-message-btn {
    margin-left: 5px;
    padding: 5px 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.chat-message {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.chat-username {
    font-weight: bold;
    color: #2ecc71;
}